@ECHO OFF
SET SITENAME=%1
SET HOSTHEADER=%2
SET CERTHASH=%3
uuidgen > temp.txt
SET /P GUID= < temp.txt
del temp.txt
@ECHO ON


netsh http add sslcert ipport=0.0.0.0:443 certstorename=MY certhash=%CERTHASH% appid={%GUID%}

%systemroot%\system32\inetsrv\appcmd set site /site.name:%SITENAME% /+bindings.[protocol='https',bindingInformation='*:443:%HOSTHEADER%']

pause